#include <iostream>
#include<math.h>
using std::cout;
using std::endl;
class Base
{
public:
Base(int value)
:_value(value){

}
friend Base operator+(const Base & left,const Base & right);
friend bool operator==(const Base & left,int num);
private:
    int _value;
};
Base operator+(const Base & left,const Base & right){
   return Base(abs(left._value - right._value));
}
bool operator==(const Base & left,int num)
{
     return left._value == num;
}
void test()
{
    int i = 2;
    int j = 7;
    Base x(i);
    Base y(j);
    cout<<(x + y == j-i)<<endl;
}
int main()
{
    test();
    return 0;
}
